<div class="case-priority-list container-fluid">

  <div class="row">
    <div class="list-toolbar col-xl-12">
      <div class="title">
        用例优先级
      </div>

      <div class="filter">
      </div>

      <div class="buttons">
        <button (click)="create()" type="button" class="btn btn-primary btn-with-icon btn-sm">
          <i class="fa fa-plus-circle"></i>新建
        </button>
      </div>
    </div>
  </div>

  <div class="row">
    <table class="table table-hover">
      <thead class="thead-inverse">
      <tr>
        <th>名称</th>
        <!--<th>取值</th>-->
        <th style="width: 250px;">是否默认</th>
        <th style="width: 250px;">操作</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let item of models; let i = index;">
        <td>{{ item.label }}</td>
        <!--<td>{{ item.value }}</td>-->
        <td>
          <input *ngIf="!item.defaultVal" (change)="setDefault(item)" [(ngModel)]="item.defaultVal" type="checkbox" name="defaultVal" #defaultVal>
          <input *ngIf="item.defaultVal" onclick="return false;" [(ngModel)]="item.defaultVal" type="checkbox" name="defaultVal" #defaultVal>
        </td>
        <td>
          <span *ngIf="i == 0" class="ionic-icon link placeholder"></span>
          <span (click)="up(item)" *ngIf="i > 0" class="fa fa-arrow-up ionic-icon link"></span>

          <span (click)="down(item)" *ngIf="i < models.length - 1" class="fa fa-arrow-down ionic-icon link"></span>
          <span *ngIf="i == models.length - 1" class="ionic-icon link placeholder"></span>
          &nbsp;
          <span (click)="edit(item)" class="link no-underline">编辑</span>
        </td>
      </tr>
      </tbody>
    </table>
  </div>
</div>
